package com.jf.cloud.multishop.feign;

import com.jf.cloud.api.multishop.feign.IndexImgFeignClient;
import com.jf.cloud.common.constant.Constant;
import com.jf.cloud.common.response.ServerResponseEntity;
import com.jf.cloud.multishop.service.IndexImgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.v3.oas.annotations.Hidden;


@RestController
@Hidden
public class IndexImgFeignController implements IndexImgFeignClient {
    @Autowired
    private IndexImgService indexImgService;
    @Override
    public ServerResponseEntity<Void> udpateIndexImgBySpuId(Long spuId, Long shopId) {
        indexImgService.batchUpdate(spuId, shopId);
        indexImgService.batchUpdate(spuId, Constant.PLATFORM_SHOP_ID);
        return ServerResponseEntity.success();
    }
}
